<template>
    <div>
        <van-sticky>
            <scrollactive class="my-nav">
                <span data-section-selector=".home" class="scrollactive-item">Home</span>
                <span data-section-selector=".about-us" class="scrollactive-item">About Us</span>
                <span data-section-selector=".portfolio" class="scrollactive-item">Portfolio</span>
                <span data-section-selector=".contact" class="scrollactive-item">Contact</span>
            </scrollactive>
        </van-sticky>


        <div class="home">1</div>
        <div class="about-us">1</div>

        <div class="portfolio">1</div>

        <div class="contact">1</div>

    </div>
</template>

<style scoped>
.my-nav > span{
    margin-right: 20px;;
}

.home,
.about-us,
.portfolio,
.contact {
    height: 500px;
}

.home {
    background-color: yellow;
}
</style>